<template>
	<view class="activeMessage">
		<view class="uni-list">
			<view class="uni-list-cell" v-for="(item,index) in dataList" :key="index">
				<view class="time">
					{{item.beginTime}}
				</view>
				<image :src="item.img" mode="scaleToFill"></image>
				<view class="desction">
					{{item.activityName}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				pageNum:1,
				dataList:[]
			}
		},
		onLoad() {
			this.getDataList()
		},
		onReachBottom() {
			this.getDataList()
		},
		onPullDownRefresh() {
			this.pageNum = 1;
			this.dataList = [];
			this.getDataList()
		},
		methods:{
			getDataList(){
				let data = {
					"pageNum": this.pageNum,
					"pageSize": 10,
				}
				this.$http.post('/api/v1.0/message/viewEventInfo',data,res=>{
					this.dataList = this.dataList.concat(res.data.data.list)
					this.pageNum++
				})
			}
		}
	}
</script>

<style lang="scss">
	.activeMessage{
		min-height: 100vh;
		background-color: #f2f2f2;
		padding-top: 30upx;
		box-sizing: border-box;
		.uni-list-cell{
			width: 694upx;
			margin: 0 auto;
			font-size: 28upx;
			color: #333;
			text-align: center;
			border-radius: 20upx;
			margin-bottom: 30upx;
			box-sizing: border-box;
			.time{
				color: #808080;
				font-size: 24upx;
				margin-bottom: 30upx;
			}
			.desction{
				color: #333;
				font-size: 32upx;
				line-height: 85upx;
				padding-left: 20upx;
				box-sizing: border-box;
				background-color: #fff;
				text-align: left;
				border-bottom-left-radius: 20upx;
				border-bottom-right-radius: 20upx;
				margin-top: -10upx;
			}
			image{
				width: 694upx;
				height: 313upx;
				border-top-left-radius: 20upx;
				border-top-right-radius: 20upx;
			}
		}
	}
</style>
